# -*- coding: utf-8 -*-
"""
Created on Thu Nov 19 11:00:06 2015

@author: liliangrong
"""

from sys import argv
from os.path import exists

script, from_file ,to_file = argv

print "copying from %s to %s" % (from_file,to_file)

in_file = open(from_file)
indata = in_file.read()
print "%d bytes long" % len(indata)

print "does the output file exists? %r" % exists(to_file)

out_file = open(to_file,'w')
out_file.write(indata)

print "all right,all done."
out_file.close()
in_file.close()
